package com.udhtu.ii.lab4;

public class App {
	public App() {

	}

//	public static void main(String args[]) {
//		double w1[][] = { { 0.1, 0.6, 0.4 }, { 0.3, -0.5, -0.2 },
//				{ -0.2, 0.4, 0.3 } };
//		double w2[][] = { { 0.4, 1.2, 0.1, -0.1 }, { -0.6, 0.2, -0.3, 0.5 } };
//		double x[] = { 1.0, 0.5, -0.2 };
//		Layer layer = new Layer(3, w1, x, 1);
//		double[] out = layer.getOut();
//		System.out.println("OUT=");
//		double[] in2 = new double[out.length + 1];
//		in2[0] = 1.0;
//		for (int i = 1; i < in2.length; i++) {
//			in2[i] = out[i - 1];
//		}
//		Layer layer2 = new Layer(2, w2, in2, 2);
//		double[] out2 = layer2.getOut();
//
//		for (int i = 0; i < out2.length; i++) {
//			System.out.print(out2[i] + " ");
//		}
//	}
	
	
	public static void main(String args[]) {
		double w1[][] = { {0.3,0.7,-0.9},{1.5,-1.4,1.2},{-0.6,1.6,0.5} };
		double w2[][] = {{1.2,-0.4,0.8,0.9},{0.6,0.3,-1.3,-0.5},{0.5,1.1,0.7,-0.2}};
		double w3[][] = { { 1.6,-0.6,0.5,0.9 },{0.8,0.3,-1.0,-0.5}, {0.4,1.2,-0.7,-0.5}};
		double x[] = { 1.0, 0.5, 1.2 };
		Layer layer = new Layer(3, w1, x, 1);
		double[] out = layer.getOut();
		System.out.println("OUT=");
		double[] in2 = new double[out.length + 1];
		in2[0] = 1.0;
		for (int i = 1; i < in2.length; i++) {
			in2[i] = out[i - 1];
		}
		Layer layer2 = new Layer(3, w2, in2, 3);
		double[] out2 = layer2.getOut();
		
		Layer layer3=new Layer(3,w3,out2,1);
		double[] out3 = layer3.getOut();
		for (int i = 0; i < out3.length; i++) {
			System.out.print(out3[i] + " ");
		}
	}
}



